# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=ovos-shell
pkgver=0.0.1_git20230404
pkgrel=2
_commit="d98c91ac82e2aa5984a4dd616f2d072ae9767395"
pkgdesc="OpenVoiceOS Shell with Mycroft GUI embedded view for Wayland and EGLFS platforms"
url="https://github.com/OpenVoiceOS/ovos-shell"
# armhf blocked by extra-cmake-modules
# ppc64le, s390x and riscv64 blocked by qt5-qtwebengine -> qt5-qtwebview
# armv7 blocked by mycroft-gui
arch="all !armhf !ppc64le !s390x !riscv64 !armv7"
license="Apache-2.0"
depends="
	kirigami2
	mycroft-gui
	plasma-pa
	"
makedepends="
	extra-cmake-modules
	kconfig5-dev
	kconfigwidgets5-dev
	kcoreaddons5-dev
	kdbusaddons5-dev
	kguiaddons5-dev
	ki18n5-dev
	kiconthemes5-dev
	kirigami2-dev
	qt5-qtbase-dev
	qt5-qtdeclarative-dev
	qt5-qtwebview-dev
	"
source="$pkgname-$_commit.tar.gz::https://github.com/OpenVoiceOS/ovos-shell/archive/$_commit.tar.gz"
options="!check" # No tests
builddir="$srcdir/$pkgname-$_commit"

provides="mycroft-embedded-shell=$pkgver-r$pkgrel"
replaces="mycroft-embedded-shell"

build() {
	cmake -B build \
		-DCMAKE_BUILD_TYPE=None \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib
	cmake --build build
}

check() {
	cd build
	CTEST_OUTPUT_ON_FAILURE=TRUE ctest
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}

sha512sums="
f02cce034edce9d234e93fbe2379a9a5f937664abfc47315665e7c29a8f3806a03b7b7614da1cc0baa35c3cf072a856ce7f9aee027a864b872a73c02b1dd3cc2  ovos-shell-d98c91ac82e2aa5984a4dd616f2d072ae9767395.tar.gz
"
